JPEG (Joint Photographic Experts Group) compression, which is as till image compression technology, and MPEG (Moving Picture Experts Group) compression, which is a motion picture compression technology, are widely known. These image compression technologies treat an 8×8-pixel block as a processing unit to perform the well-known Discrete Cosine Transform (hereinafter referred to as DCT). The DCT is a process for separating an image into spatial frequency components that can reduce spatially redundant information to compress that image.
When JPEG or MPEG technology is used, two types of noise, which will be described below, are generated, degrading image quality. In the JPEG and MPEG technologies, an 8×8-pixel block is treated as a processing unit. The boundaries of these blocks are perceived by a user as noise. The boundary noise is called block noise.
DCT in the JPEG and MPEG techniques removes high frequency components as redundant information. As a result, noise appears in regions where there is a large difference in luminance between a boundary and the surrounding region. For example, if there are fluctuations in luminance in a block, as in a case where a block contains a character against a natural picture, hazy noise appears at the boundary of the character because DCT removes high frequency components from data constituting the true boundary of the character. This noise is called mosquito noise.
Known techniques for reducing such block noise include Verification Model (hereinafter abbreviated to VM) and a technique described in Japanese Patent Laid-Open No. 11-98505. In the technique described in the Japanese Patent Laid-Open No. 11-98505, it is determined which of default mode and DC offset mode is used for vertical and horizontal block boundaries shown in FIG. 13 and a process is performed.
In this case, pixel sets S0, S1, and S2 are defined using block boundaries B1 and B2 as the base points and one of the default mode and DC offset mode is selected as deblocking mode based on block distortion level of a mode determination value. If the default mode is selected, a 4-point DCT kernel is used to obtain information about frequencies around the block boundary for each pixel. If DC offset mode is selected in the mode determination step, it is determined whether execution of DC offset mode is required or not. If it is required, block distortion is removed in regions where the motion of the image is slow.
In addition, the VM includes filtering for removing mosquito noise. The filtering involves a process for obtaining maximum and minimum values within the block, thresholding for all pixels, and determination whether mosquito noise reduction should be performed or not.
A technique for reducing such noise as described above is described in Japanese Patent Laid-Open No. 3-46482. In the technique described in the document, filtering is performed if a difference in signal levels between two pixels adjacent to a boundary is greater than a first threshold and a difference in signal levels between a pixel adjacent to the boundary and a pixel neighboring that pixel in the same block among pixels on the row is smaller than a second threshold, filtering is performed.
In FIG. 12, the signal levels at pixel positions X0 and X′0 are corrected based on difference values d0, d1, and d2 between signal levels S1, S0, S′0, and S′1 at pixel positions X1 and X0 and pixel positions X′0 and X′1 that are located on either side of a block boundary. Signal levels S0-new and S′0-new will be as follows.S0-new=(S1+2·S0+S′0)/4S′0-new=(S0+2·S′0+S′1)/4
However, the technique described in Japanese Patent Laid-Open No. 3-46482 is insufficient for removing block distortion because it makes a correction to boundary pixels only. The VM and the technique described in Japanese Patent Laid-Open No. 11-98505 also have a short coming that the process is complex and therefore involves a too high computational load.
Several studies and experiments have shown the following facts. First, it is insufficient that only one or two pixels at a block boundary are corrected by filtering. At least three pixels should be corrected. In addition, it is difficult to discriminate between mosquito noise around edges and high-frequency-component features of an image. Furthermore, determination using block boundary pixels alone can detect block distortion but cannot properly determine which of a broadband filter and a narrow band filter should be used. Broadband filtering should not be applied to a block containing a strong edge.
The present invention has been made to solve these problems with the prior art. An object of the present invention is to provide an image processing system, method, and program that can reduce the above-described noise by a simpler process.